/*eslint-disable*/
/**
 * [courseService 例：用户模块所有的请求，都在这里面维护]
 */
const courseService = {
  getComments() {
    return http
      .get('/api/comment', {
        openid: 'oSQAl1RHIa3ugS2Zkks4KtyeKdLo'
      })
      .then(res => {
        console.log(res)
      })
  },

  // 获取课程首页信息
  getCourseIndex(param) {
    return http.get('/course/index', param)
  },

  // 获取课程详情
  getCourseDetails(param) {
    return http.get('/course/detail', param)
  },

  // 获取课程评论
  getCourseComment(param) {
    return http.get('/course/detail/morecomments', param)
  },

  // 获取视频凭证
  getVideoAuth(param) {
    return http.get('/member/play_video_auth', param)
  },
  // 获取视频url
  getVideoUrl(param) {
    console.log(param)
    return http.get('/member/play_video_info', param)
  }
}
